﻿@model CTMOES.Models.PaperModel
@{
    ViewBag.Title = "Exam";
}
<script>
    $(function () {
        $("input:submit", ".flag").button();
    });
</script>
<div id="examBody">
    <div id="examHeader">
        <span id="examName">魔兽世界之大地的裂变</span>
        <ul id="examMenu">
            <li>完成度</li>
            <li id="progress">
                <img id="progressBar" width="110px" height="22px" src="../Images/progress.png" />
            </li>
            <li>剩余时间</li>
            <li>00:00:00</li>
            <li>放弃考试</li>
            <li>
                <img id="close" width="9px" height="9px" src="../Images/close.png" />
            </li>
        </ul>
    </div>
    @using (Html.BeginForm())
    {
        <div id="examContent">
            @Html.ValidationSummary(true)
            <div>
                <h3>
                    一、单选题</h3>
                @foreach (var item in Model.Choice)
                {
        
                    <p class="ProContent">
                        @Html.DisplayFor(modelItem => item.ProContent)
                    </p>
                   foreach (var option in item.OptionList)
                   { 
                    <p class="Option">
                        @Html.RadioButton(option.QueID.ToString(), option.ID)
                        @Html.Label(option.Description)
                    </p>            
                   }
                }
            </div>
            <div>
                <h3>
                    二、多选题</h3>
                @foreach (var item in Model.MultiChoice)
                {
                    <p class="ProContent">
                        @Html.DisplayFor(modelItem => item.ProContent)
                    </p>
                   foreach (var option in item.OptionList)
                   { 
                    <p class="Option">
                        @Html.CheckBox(option.ID.ToString())
                        @Html.Label(option.Description)
                    </p>            
                   }
                }
            </div>
            <div>
                <h3>
                    三、判断题</h3>
                @foreach (var item in Model.Judgement)
                {
                    <p class="ProContent">
                        @Html.DisplayFor(modelItem => item.ProContent)
                        @foreach (var option in item.OptionList)
                        {
                            @Html.CheckBox(option.ID.ToString())
                        }
                    </p>
                }
            </div>
        </div>
        <div class="flag">
            <input type="submit" value="交卷" />
        </div>
    }
</div>
<div id="random">
    <script type="text/javascript">
        function rd() {
            var select = Math.floor(Math.random() * 4) + 1;
            var tmplabel = document.getElementById("rddiv");
            tmplabel.innerHTML = "<label>" + select + "</label>";
        }
    </script>
    <input type="button" onclick="rd()" id="shaizi" />
    <div id="rddiv">
    </div>
</div>
